package com.dao;

import com.entity.TestPaperQuestion;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Version: V1.0    <br/>
 * Datetime:   2022/5/15 16:35   <br/>
 * Description: 试卷和试题关系表
 *
 * @author: chen
 */
@Mapper
public interface TestPaperQuestionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TestPaperQuestion record);

    int insertSelective(TestPaperQuestion record);

    TestPaperQuestion selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TestPaperQuestion record);

    int updateByPrimaryKey(TestPaperQuestion record);

    int deleteByQuestionId(@Param("id") Integer id);

    int insertList(@Param("list") List<TestPaperQuestion> list);

    @Delete("delete from test_paper_question where test_paper_id = #{paperNumber} ")
    int deleteByExaminationPaperId(@Param("paperNumber") Integer paperNumber);

    List<TestPaperQuestion> selectByExaminationPaperId(@Param("id") Integer id);

    Integer countByExaminationPaperId(@Param("id") Integer id);
}